// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProcessOutsourceSettlementId',
        footer: "Foots",
        cnName: '工序委外结算',
        name: 'ProcessOutsourceSettlement',
        newTabEdit: false,
        url: "/ProcessOutsourceSettlement/",
        sortName: "ProcessOutsourceSettlementId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"BillNo":"","BillDate":"","DepartmentId":"","SupplyName":"","Remark":""};
    const editFormOptions = [[{"title":"单据编号","field":"BillNo","type":"text"},
                               {"title":"单据日期","required":true,"field":"BillDate","type":"date"}],
                              [{"dataKey":"部门级联","data":[],"title":"部门","field":"DepartmentId","type":"select"},
                               {"title":"供应商","required":true,"field":"SupplyName","disabled":true,"type":"text"},
                               {"title":"备注","field":"Remark","colSize":12,"type":"textarea"}]];
    const searchFormFields = {"BillNo":"","BillDate":""};
    const searchFormOptions = [[{"title":"单据编号","field":"BillNo","type":"like"},{"title":"单据日期","field":"BillDate","type":"date"}]];
    const columns = [{field:'ProcessOutsourceSettlementId',title:'委外结算单标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'BillNo',title:'单据编号',type:'string',link:true,width:180,align:'left'},
                       {field:'BillDate',title:'单据日期',type:'datetime',width:110,require:true,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,align:'left'},
                       {field:'SupplyName',title:'供应商',type:'string',width:110,readonly:true,require:true,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:300,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:150,align:'left'},
                       {field:'AuditDate',title:'审核日期',type:'datetime',width:150,align:'left'},
                       {field:'AuditStatus',title:'审核状态',type:'int',bind:{ key:'audit',data:[]},width:80,align:'left'},
                       {field:'AuditId',title:'审核人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Auditor',title:'审核人',type:'string',width:110,align:'left'},
                       {field:'OutsourceProcessReportId',title:'委外工序汇报标识',type:'int',width:80,hidden:true,require:true,align:'left'},
                       {field:'ProductTaskId',title:'生产任务标识',type:'int',width:80,hidden:true,require:true,align:'left'}];
    const detail =  {
                    cnName: '结算明细',
                    table: 'OutsourceSettlementDetail',
                    columns: [{field:'OutsourceSettlementDetailId',title:'工序委外结算明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProcessOutsourceSettlementId',title:'工序委外结算标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialId',title:'产品标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'产品编码',type:'string',width:120,readonly:true,edit:{type:'text'},require:true,align:'left'},
                       {field:'MaterialName',title:'产品名称',type:'string',width:120,readonly:true,edit:{type:'text'},require:true,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:120,readonly:true,edit:{type:'text'},align:'left'},
                       {field:'UnitId',title:'计量单位',type:'int',bind:{ key:'计量单位',data:[]},width:110,readonly:true,edit:{type:'select'},require:true,align:'left'},
                       {field:'Rate',title:'税率',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'RateAmount',title:'税额',type:'decimal',width:110,readonly:true,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'OutQty',title:'委外数量',type:'decimal',width:110,readonly:true,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'SettlementQty',title:'结算数量',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'SettlementAllPrice',title:'结算含税单价',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'SettlementAllAmount',title:'结算价税合计',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'SettlementPrice',title:'结算单价',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'},
                       {field:'SettlementAmount',title:'结算金额',type:'decimal',width:110,edit:{type:'decimal'},require:true,align:'left'}],
                    sortName: 'OutsourceSettlementDetailId',
                    key: 'OutsourceSettlementDetailId'
                                            };
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}